package com.enfo.zjabank.dao;

import org.springframework.stereotype.Repository;

/**
 * Created by zhoum on 2016/8/22.
 */
@Repository
public class SessionDaoImpl extends BaseDao implements SessionDao{
    @Override
    public boolean checkSessionExist(String sessionId) {
        String sql = "select 1 from sessions where session_id=?";
        String result = queryForObject(sql, new Object[]{sessionId}, String.class);
        if(result!=null && "1".equals(result)){
            return true;
        }
        return false;
    }
}
